#!/bin/bash

wd="`pwd`"
. $wd/env

echo " start krdc 0:3 "

if [ ! -f $wd/tmp/hda.img ]; then
	qemu-img create -f qcow2 $wd/tmp/hda.img 2G
elif [ ! -f $wd/tmp/hdb.img ]; then
	qemu-img create -f qcow2 $wd/tmp/hdb.img 2G
fi

if [ ! -f $wd/nemonico.iso ]; then
	echo "ERROR: there is no $wd/nemonico.iso image !!"
	exit 1
fi

qemu -no-kqemu -cdrom ./nemonico.iso -hda $wd/tmp/hda.img -boot d -m 128 -vnc 0:3
#qemu -cdrom $wd/nemonico.iso -hda $wd/tmp/nemonico_test.img -boot d -m 256 -vnc 0:3
